for (Object object : list) [java] and index element

Posted by EugeneP on Stack Overflow See other posts from Stack Overflow or by EugeneP
Published on 2010-05-18T14:21:28Z Indexed on 2010/05/18 14:30 UTC
Read the original article Hit count: 113

Filed under:
|
|

Is there a way to get an element id of a list to get it later through list.get(index)

when using

for(Object obj: o)

construction

Only define a local var and manually incrementing it? Anything simpler?

© Stack Overflow or respective owner

Related posts about java

Related posts about loop